package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface UserMapper {


    //判断当前用户是否为新用户
    @Select("select * from user where openid = #{openid}")
    User getByOpenid(String openid);


    //自动完成注册
    void insert(User user);

    /**
     * 根据条件统计订单数量
     */
    Integer countByMap(Map map);
}
